﻿using MudBlazor;
using static MudBlazor.CategoryTypes;

namespace MXERP.Blazor.Components;

public partial class SelectColumn<T> : TemplateColumn<T>
{
    public SelectColumn()
    {
        Width = "60";
        Tag = "select-column";
        StickyLeft = true;
        HeaderTemplate = context => RenderHeaderTemplate(context);
        CellTemplate = context => RenderCellTemplate(context);
    }
    /// <summary>
    /// The size of the checkbox icon.
    /// </summary>
    [Parameter]
    public Size Size { get; set; } = Size.Small;
    [Parameter] public bool CheckStrictly { get; set; } = true;

    protected override void OnInitialized()
    {
        base.OnInitialized();
        if (Table != null)
        {
            Table.SelectColumn = this;
        }
    }
}
